//
//  GJLoginViewController.m
//  GJLifeSimple
//
//  Created by swift on 16/6/18.
//  Copyright © 2016年 GoodJob. All rights reserved.
//

#import "GJLoginViewController.h"

@interface GJLoginViewController ()

@end

@implementation GJLoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
//    [self setupUI];
}
- (IBAction)Back:(id)sender {
    
    [self.navigationController popViewControllerAnimated:YES];
    self.tabBarController.tabBar.hidden = NO;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - 设置界面
- (void)setupUI {
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    //nav
    UIImage *image = [UIImage imageNamed:@"我们"];
    NSString *item = @"返回";
   
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:item style:UIBarButtonItemStylePlain target:self action:nil];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:image style:UIBarButtonItemStylePlain target:self action:nil];
    self.navigationItem.title = @"登录";
    
    //用户名登录框
    UITextField *userName = [[UITextField alloc] init];
    userName.borderStyle =UITextBorderStyleRoundedRect;
    userName.backgroundColor = [UIColor cz_colorWithHex:0x51BEF9];
    
    [self.view addSubview:userName];
    
    [userName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(33);
        make.left.equalTo(self.view).offset(20);
        make.right.equalTo(self.view).offset(-20);
        make.height.mas_equalTo(40);
    }];
    
    //密码框
    UITextField *password = [[UITextField alloc] init];
    password.borderStyle =UITextBorderStyleRoundedRect;
    
    [self.view addSubview:password];
    
    [password mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(userName.mas_bottom).offset(20);
        make.left.right.equalTo(userName);
        make.height.mas_equalTo(40);
    }];
    
    
}





@end
